home *** CD-ROM | disk | FTP | other *** search
Makefile | 1996-09-30 | 6.2 KB | 148 lines | [TEXT/MPS ] |
- #
- # makefile for "fileCompress.r", the example for InstaCompOne file compression
- #
- #
- # to build installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fileCompressSplit" ( note: ".r" is omitted )
- #
- # to build debug version of installer script :
- # 1) select "Build" from "Build" menu
- # 2) type script name "fileCompressSplit.debug" ( note: ".r" is omitted )
- #
- #
-
- # • script names
-
- # the installer script name
- scriptName = fileCompressSplit
- # the debug version installer script name
- debugScriptName = {scriptName}.debug
- # filename for ScriptCheck extension that will run when ScriptCheck does
- localScriptCheckExtName = {scriptName}.scx
-
- # • tool names
-
- # • support directory names
-
- # directory where ScriptCheck MPW tool can be found
- ScriptCheckDir = :::Tools:Released:ScriptCheck 4.0.3:
- # directory where RIncludes can be found
- InstallerRIncDir = :::DeveloperInterfaces:RIncludes:
- # directory where the Installer Debugger can be found
- InstallerDebuggerDir = :::Tools:Released:Installer Debugger 4.0.3:
- # directory where the InstaCompOne stuff can be found
- InstaCompOneDir = :::Tools:Released:InstaCompOne 1.1:
-
-
- # InstaCompOne compression tool
- compressTool = {InstaCompOneDir}InstaCompOneTool
-
- # Splitting tool
- splitTool = {InstaCompOneDir}FileAndRsrcSplitterTool
-
- # Original ScriptCheck Extension
- ScriptCheckExtension = {InstaCompOneDir}InstaCompOneSCExt.rsrc
-
-
- # • simple compression example
-
- # source file to be compressed
- SimpleSourceFileName = Example File • 1
- # archive file to be compressed into
- SimpleArchiveName = :Disk 1:Tome
-
- # • split compression example
-
- # source file to be split and compressed
- SplitCompSourceFileName = Example File • 2
- # base name to use for files resulting from splitting operation
- SplitCompFileName = splitCompExFile
- # first interim file resulting from splitting operation
- SplitCompFileName1 = splitCompExFile.rsrc1
- # second interim file resulting from splitting operation
- SplitCompFileName2 = splitCompExFile.rsrc2
- # third interim file resulting from splitting operation
- SplitCompFileName3 = splitCompExFile.data1
- # archive resulting from compression of first interim file
- SplitCompArchiveName1 = :Disk 1:splitCompTome1
- # archive resulting from compression of second interim file
- SplitCompArchiveName2 = :Disk 2:splitCompTome2
- # archive resulting from compression of third interim file
- SplitCompArchiveName3 = :Disk 2:splitCompTome3
-
- # • split w/o compression example
-
- # source file to be split, but not compressed
- SplitSourceFileName = Example File • 3
- # base name to use for files resulting from splitting operation
- SplitFileName = splitExFile
- # first interim file resulting from splitting operation
- SplitFileName1 = splitExFile.rsrc1
- # second interim file resulting from splitting operation
- SplitFileName2 = splitExFile.rsrc2
- # third interim file resulting from splitting operation
- SplitFileName3 = splitExFile.data1
- # first archive resulting from splitting of file
- SplitArchiveName1 = :Disk 1:splitTome1
- # second archive resulting from splitting of file
- SplitArchiveName2 = :Disk 2:splitTome2
- # third archive resulting from splitting of file
- SplitArchiveName3 = :Disk 2:splitTome3
-
-
-
- # make the debug version of finished installer script
- "{debugScriptName}" ƒ "{scriptName}"
- # make a copy of the finished installer script and rename the copy
- Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
- # add the installer debugger resources to the copied installer script
- Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
-
- # make the standard version of finished installer script
- "{scriptName}" ƒ makefile "{scriptName}.r" "{SimpleArchiveName}" "{SplitCompArchiveName1}" "{SplitArchiveName1}" "{localScriptCheckExtName}"
- # establish current date with time of NOON
- set theTime "'`date -d -s` 12:00:00 PM'"
- # rez the installer source into the form that the installer can read
- Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
- # establish filename for finished installer script, set creation date and time, set attributes
- SetFile -a b -d {theTime} "{scriptName}"
- # run scriptcheck utility on the rezzed installer script
- "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
- # set modification date and time for finished installer script
- SetFile -m {theTime} "{scriptName}"
-
- # be sure that's there's a copy of the InstaCompOne ScriptCheck extension in current folder
- "{localScriptCheckExtName}" ƒ "{ScriptCheckExtension}"
- # copy and rename the original scriptcheck extension
- Duplicate -y "{ScriptCheckExtension}" "{localScriptCheckExtName}"
-
- # do the simple compression
- "{SimpleArchiveName}" ƒ makefile "{SimpleSourceFileName}"
- # compress entire source file into one archive
- "{compressTool}" "{SimpleSourceFileName}" -o "{SimpleArchiveName}"
-
- # do the split compression
- "{SplitCompArchiveName1}" ƒ makefile "{SplitCompSourceFileName}"
- # split source file into parts no larger than 1650 bytes - place in two interim files
- "{splitTool}" "{SplitCompSourceFileName}" -s 1650 -o "{SplitCompFileName}"
- # compress contents of first interim resource fork file into first archive
- "{compressTool}" "{SplitCompFileName1}" -o "{SplitCompArchiveName1}" -f "{SplitCompSourceFileName}" -e
- # compress contents of second interim resource fork file into second archive
- "{compressTool}" "{SplitCompFileName2}" -o "{SplitCompArchiveName2}" -f "{SplitCompSourceFileName}" -e
- # create archive with data fork of split file by copying data fork interim file
- # (don't compress contents of data fork because we won't gain anything)
- Duplicate -y "{SplitCompFileName3}" "{SplitCompArchiveName3}"
-
- # do the split w/o compression
- "{SplitArchiveName1}" ƒ makefile "{SplitSourceFileName}"
- # split source file into parts no larger than 1650 bytes - place in two interim files
- "{splitTool}" "{SplitSourceFileName}" -s 1650 -o "{SplitFileName}"
- # create archive with first part of split file by copying first interim file
- Duplicate -y "{SplitFileName1}" "{SplitArchiveName1}"
- # create archive with second part of split file by copying second interim file
- Duplicate -y "{SplitFileName2}" "{SplitArchiveName2}"
- # create archive with data fork of split file by copying data fork interim file
- Duplicate -y "{SplitFileName3}" "{SplitArchiveName3}"
-
-